



main(){
	local path=$1
	test -z ${path} && die "请给出需要转换的旧项目地址!"
	cd ${path}
	#转移alps代码
	local alps_project=$(git config  remote.origin.url | xargs basename)
	local teksun_project=$($SSH -p $PORT ${WHO}@${SERVER} gerrit "ls-projects" | grep -ow "teksun_${alps_project}")
	test -z "${teksun_project}" && die "该平台代码并未启用alps-teksun架构!"
	mkdir alps
	mv * alps
	mv .git alps
	
	cd alps
	#切换alps分支
	git checkout . 
	git checkout -b alps origin/alps
	#更新alps的hooks分支
	git-gerrit init

	cd ../
	#下载teksun代码
	git clone ssh://${WHO}@${SERVER}:${PORT}/${teksun_project} teksun
	#切换teksun的hooks分支
	git-gerrit init 


}




main $1 $2 $3
